package com.hy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.hy.domain.Cases;

@Controller
public class NewAnliController {
	
	@RequestMapping("/anli/view/{id}")
	public String view(@PathVariable long id, Model model) {
		Cases cases = Cases.findCases(id);
		model.addAttribute("cases", cases);
		model.addAttribute("prev", cases.prev());
		model.addAttribute("next", cases.next());
		return "anli_xq";
	}
}
